package com.rohoo.framework.dao;

import java.io.Serializable;
import java.util.Collection;

public class DataPackage implements Serializable {
	private static final long serialVersionUID = -3847321538691386074L;

	public int rowCount;

	public int pageLines;

	public int currPage;

	public Collection rowList;
	/**
	 * @return Returns the datas.
	 */
	public Collection getRowList() {
		return rowList;
	}
	/**
	 * @param datas The datas to set.
	 */
	public void setRowList(Collection rowList) {
		this.rowList = rowList;
	}
	/**
	 * @return Returns the lines Per Page.
	 */
	public int getPageLines() {
		return pageLines;
	}
	/**
	 * @param linesPerPage The linesPerPage to set.
	 */
	public void setPageLines(int pageLines) {
		this.pageLines = pageLines;
	}
	/**
	 * @return Returns the pageNo.
	 */
	public int getCurrPage() {
		return currPage;
	}
	/**
	 * @param pageNo The pageNo to set.
	 */
	public void setCurrPage(int currPage) {
		this.currPage = currPage;
	}
	/**
	 * @return Returns the rowCount.
	 */
	public int getRowCount() {
		return rowCount;
	}
	/**
	 * @param rowCount The rowCount to set.
	 */
	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}
	/**
	 * Return the total page number
	 * @return The total page number.
	 */
	public int getPageCount() {
		return (int) Math.ceil((double) rowCount / (double) pageLines);
	}
}
